export default function strToNode(keyword,value){
  let nodes = []
  if(keyword.toUpperCase().startsWith(value.toUpperCase())){
    let key1 = keyword.slice(0,value.length)
    let node1 = {
      name:"span",
      attrs:{style:"color: #26ce8a; font-size: 14px;"},
      children:[{type:"text", text:key1}]
    }
    nodes.push(node1)
    let key2 = keyword.slice(value.length)
    let node2 = {
      name:"span",
      attrs:{style:"color: #000000; font-size: 14px;"},
      children:[{type:"text", text:key2}]
    }
    nodes.push(node2)
  }else{
    let node = {
      name:"span",
      attrs:{style:"color: #000000; font-size: 14px;"},
      children:[{type:"text", text:keyword}]
    }
    nodes.push(node)
  }
  return nodes
} 